{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Examples of plugins usage in folium"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this notebook we show a few illustrations of folium's plugin extensions. These are available after importing `folium.plugins`."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## ScrollZoomToggler\n",
    "Adds a button to enable/disable zoom scrolling."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5L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UtbWFya2Vycy5jc3MiLz4KICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L2doL3B5dGhvbi12aXN1YWxpemF0aW9uL2ZvbGl1bS9mb2xpdW0vdGVtcGxhdGVzL2xlYWZsZXQuYXdlc29tZS5yb3RhdGUubWluLmNzcyIvPgogICAgCiAgICAgICAgICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfNzExMjM3OThiYzc4NDAxYWE0ODk4NWFlYzFlZTIwNjQgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgCiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNzY3JvbGxfem9vbV90b2dnbGVyX2Q0MDdkNTEwYzBkYzQwYjdhZWQ3NWFjNTQ3Y2FkMjViIHsKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjphYnNvbHV0ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDozNXB4OwogICAgICAgICAgICAgICAgICAgIGJvdHRvbToxMHB4OwogICAgICAgICAgICAgICAgICAgIGhlaWdodDozNXB4OwogICAgICAgICAgICAgICAgICAgIGxlZnQ6MTBweDsKICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6MzVweDsKICAgICAgICAgICAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgPC9zdHlsZT4KICAgICAgICAKPC9oZWFkPgo8Ym9keT4gICAgCiAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF83MTEyMzc5OGJjNzg0MDFhYTQ4OTg1YWVjMWVlMjA2NCIgPjwvZGl2PgogICAgICAgIAogICAgCiAgICAgICAgICAgIDxpbWcgaWQ9InNjcm9sbF96b29tX3RvZ2dsZXJfZDQwN2Q1MTBjMGRjNDBiN2FlZDc1YWM1NDdjYWQyNWIiCiAgICAgICAgICAgICAgICAgYWx0PSJzY3JvbGwiCiAgICAgICAgICAgICAgICAgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9pb25pY29ucy8yLjAuMS9wbmcvNTEyL2Fycm93LW1vdmUucG5nIgogICAgICAgICAgICAgICAgIHN0eWxlPSJ6LWluZGV4OiA5OTk5OTkiCiAgICAgICAgICAgICAgICAgb25jbGljaz0ibWFwXzcxMTIzNzk4YmM3ODQwMWFhNDg5ODVhZWMxZWUyMDY0LnRvZ2dsZVNjcm9sbCgpIj4KICAgICAgICAgICAgPC9pbWc+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF83MTEyMzc5OGJjNzg0MDFhYTQ4OTg1YWVjMWVlMjA2NCA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF83MTEyMzc5OGJjNzg0MDFhYTQ4OTg1YWVjMWVlMjA2NCIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbNDUuMCwgMy4wXSwKICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3LAogICAgICAgICAgICAgICAgICAgIHpvb206IDQsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgcHJlZmVyQ2FudmFzOiBmYWxzZSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKTsKCiAgICAgICAgICAgIAoKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl9kYjFkNGNiMTUzZTc0NGE2ODU0N2NmNGMwMDVhNDM0MCA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgImh0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nIiwKICAgICAgICAgICAgICAgIHsiYXR0cmlidXRpb24iOiAiRGF0YSBieSBcdTAwMjZjb3B5OyBcdTAwM2NhIGhyZWY9XCJodHRwOi8vb3BlbnN0cmVldG1hcC5vcmdcIlx1MDAzZU9wZW5TdHJlZXRNYXBcdTAwM2MvYVx1MDAzZSwgdW5kZXIgXHUwMDNjYSBocmVmPVwiaHR0cDovL3d3dy5vcGVuc3RyZWV0bWFwLm9yZy9jb3B5cmlnaHRcIlx1MDAzZU9EYkxcdTAwM2MvYVx1MDAzZS4iLCAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsICJtYXhOYXRpdmVab29tIjogMTgsICJtYXhab29tIjogMTgsICJtaW5ab29tIjogMCwgIm5vV3JhcCI6IGZhbHNlLCAib3BhY2l0eSI6IDEsICJzdWJkb21haW5zIjogImFiYyIsICJ0bXMiOiBmYWxzZX0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfNzExMjM3OThiYzc4NDAxYWE0ODk4NWFlYzFlZTIwNjQpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIG1hcF83MTEyMzc5OGJjNzg0MDFhYTQ4OTg1YWVjMWVlMjA2NC5zY3JvbGxFbmFibGVkID0gdHJ1ZTsKCiAgICAgICAgICAgIG1hcF83MTEyMzc5OGJjNzg0MDFhYTQ4OTg1YWVjMWVlMjA2NC50b2dnbGVTY3JvbGwgPSBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgIGlmICh0aGlzLnNjcm9sbEVuYWJsZWQpIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbEVuYWJsZWQgPSBmYWxzZTsKICAgICAgICAgICAgICAgICAgICB0aGlzLnNjcm9sbFdoZWVsWm9vbS5kaXNhYmxlKCk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsRW5hYmxlZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgdGhpcy5zY3JvbGxXaGVlbFpvb20uZW5hYmxlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIG1hcF83MTEyMzc5OGJjNzg0MDFhYTQ4OTg1YWVjMWVlMjA2NC50b2dnbGVTY3JvbGwoKTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb4f44b1100>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import folium\n",
    "from folium import plugins\n",
    "\n",
    "m = folium.Map([45, 3], zoom_start=4)\n",
    "\n",
    "plugins.ScrollZoomToggler().add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## MarkerCluster"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Adds a MarkerCluster layer on the map."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9ham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Im1hcF9mZWRkNGM4MmFkYmM0MDc1YTE4MGZkZTc2MWJkMjE4NiIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXBfZmVkZDRjODJhZGJjNDA3NWExODBmZGU3NjFiZDIxODYgPSBMLm1hcCgKICAgICAgICAgICAgICAgICJtYXBfZmVkZDRjODJhZGJjNDA3NWExODBmZGU3NjFiZDIxODYiLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWzQ1LjAsIDMuMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA0LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfNGViNWNlMDQ4N2JkNGZiMmE4YmFiZTBhNWY4YTg5ODMgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4Tm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AgICAgIHZhciBodG1sXzg0ZDQ5ZjYyZDBmYzQ2Mzg5MWVjMjhlNDA3YzVjMDQ2ID0gJChgPGRpdiBpZD0iaHRtbF84NGQ0OWY2MmQwZmM0NjM4OTFlYzI4ZTQwN2M1YzA0NiIgc3R5bGU9IndpZHRoOiAxMDAuMCU7IGhlaWdodDogMTAwLjAlOyI+OTk8L2Rpdj5gKVswXTsKICAgICAgICAgICAgcG9wdXBfMzliYTJmYjBhNTAxNGU4ZWI0YTRlMGU3OGViNjQzMzguc2V0Q29udGVudChodG1sXzg0ZDQ5ZjYyZDBmYzQ2Mzg5MWVjMjhlNDA3YzVjMDQ2KTsKICAgICAgICAKCiAgICAgICAgbWFya2VyXzNhZDA1NWM0MWE0YzQ5ZDE5MTliM2E1NDMwM2Q2MDJkLmJpbmRQb3B1cChwb3B1cF8zOWJhMmZiMGE1MDE0ZThlYjRhNGUwZTc4ZWI2NDMzOCkKICAgICAgICA7CgogICAgICAgIAogICAgCjwvc2NyaXB0Pg== onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb499ca35b0>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "\n",
    "N = 100\n",
    "data = np.array(\n",
    "    [\n",
    "        np.random.uniform(low=35, high=60, size=N),  # Random latitudes in Europe.\n",
    "        np.random.uniform(low=-12, high=30, size=N),  # Random longitudes in Europe.\n",
    "    ]\n",
    ").T\n",
    "popups = [str(i) for i in range(N)]  # Popups texts are simple numbers.\n",
    "\n",
    "m = folium.Map([45, 3], zoom_start=4)\n",
    "\n",
    "plugins.MarkerCluster(data, popups=popups).add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Terminator"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91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ZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsCiAgICAgICAgICAgICAgICBpbml0aWFsLXNjYWxlPTEuMCwgbWF4aW11bS1zY2FsZT0xLjAsIHVzZXItc2NhbGFibGU9bm8iIC8+CiAgICAgICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgICAgICNtYXBfNmNkMjNlMzBiOWZjNGFiM2I4Y2NjZTlkNmU0Zjg5MjIgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vdW5wa2cuY29tL0Bqb2VyZ2RpZXRyaWNoL2xlYWZsZXQudGVybWluYXRvciI+PC9zY3JpcHQ+CjwvaGVhZD4KPGJvZHk+ICAgIAogICAgCiAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvbGl1bS1tYXAiIGlkPSJtYXBfNmNkMjNlMzBiOWZjNGFiM2I4Y2NjZTlkNmU0Zjg5MjIiID48L2Rpdj4KICAgICAgICAKPC9ib2R5Pgo8c2NyaXB0PiAgICAKICAgIAogICAgICAgICAgICB2YXIgbWFwXzZjZDIzZTMwYjlmYzRhYjNiOGNjY2U5ZDZlNGY4OTIyID0gTC5tYXAoCiAgICAgICAgICAgICAgICAibWFwXzZjZDIzZTMwYjlmYzRhYjNiOGNjY2U5ZDZlNGY4OTIyIiwKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBjZW50ZXI6IFs0NS4wLCAzLjBdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5D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AKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb499b64a30>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([45, 3], zoom_start=1)\n",
    "\n",
    "plugins.Terminator().add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  BoatMarker"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL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M0NjdhYmYwOWMxZmIyMmI3NWQzNCIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXBfNGZhYzMwY2VmMzUzNDY3YWJmMDljMWZiMjJiNzVkMzQgPSBMLm1hcCgKICAgICAgICAgICAgICAgICJtYXBfNGZhYzMwY2VmMzUzNDY3YWJmMDljMWZiMjJiNzVkMzQiLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWzMwLjAsIDAuMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiAzLAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfOGVhYWM1YzBkYWIyNDMzYjlmNmI4MDBlY2E2YzIyODYgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4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AgICAyNSwKICAgICAgICAgICAgICAgIDQ2CiAgICAgICAgICAgICk7CiAgICAgICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb499b719a0>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([30, 0], zoom_start=3)\n",
    "\n",
    "plugins.BoatMarker(\n",
    "    location=(34, -43), heading=45, wind_heading=150, wind_speed=45, color=\"#8f8\"\n",
    ").add_to(m)\n",
    "\n",
    "plugins.BoatMarker(\n",
    "    location=(46, -30), heading=-20, wind_heading=46, wind_speed=25, color=\"#88f\"\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## BeautifyIcon"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogM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M9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9naC9tYXJzbGFuMzkwL0JlYXV0aWZ5TWFya2VyL2xlYWZsZXQtYmVhdXRpZnktbWFya2VyLWljb24ubWluLmpzIj48L3NjcmlwdD4KICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L2doL21hcnNsYW4zOTAvQmVhdXRpZnlNYXJrZXIvbGVhZmxldC1iZWF1dGlmeS1tYXJrZXItaWNvbi5taW4uY3NzIi8+CjwvaGVhZD4KPGJvZHk+ICAgIAogICAgCiAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvbGl1bS1tYXAiIGlkPSJtYXBfNDdiOWRlMTFkOWVjNGU0ODkxYjMwYWE4YWFmMjk3NDciID48L2Rpdj4KICAgICAgICAKPC9ib2R5Pgo8c2NyaXB0PiAgICAKICAgIAogICAgICAgICAgICB2YXIgbWFwXzQ3YjlkZTExZDllYzRlNDg5MWIzMGFhOGFhZjI5NzQ3ID0gTC5tYXAoCiAgICAgICAgICAgICAgICAibWFwXzQ3YjlkZTExZDllYzRlNDg5MWIzMGFhOGFhZjI5NzQ3IiwKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBjZW50ZXI6IFs0NS41LCAtMTIyLjBdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcsCiAgICAgICAgICAgICAgICAgICAgem9vbTogMywKICAgICAgICAgICAgICAgICAgICB6b29tQ29udHJvbDogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBwcmVmZXJDYW52YXM6IGZhbHNlLAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApOwoKICAgICAgICAgICAgCgogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyXzcyNWQyYzRhMmNhNjRhNTJiOWM4MjViMDU4NDE2ZmJlID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAg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HN0eWxlPSJ3aWR0aDogMTAwLjAlOyBoZWlnaHQ6IDEwMC4wJTsiPlBvcnRsYW5kLCBPUjwvZGl2PmApWzBdOwogICAgICAgICAgICBwb3B1cF8yMTIxYzMwNTNmMDQ0ZGZmYWYzZGFlNzNhZTNmNjRjMy5zZXRDb250ZW50KGh0bWxfN2FkOTJlM2JlZGM0NDc5MzkxOGRmZWNhMTlkNjM1MzgpOwogICAgICAgIAoKICAgICAgICBtYXJrZXJfMjBjOWU1ZmE3MDAyNGI1NTkyMmNjOGQ4Mzg1YWM0ZDQuYmluZFBvcHVwKHBvcHVwXzIxMjFjMzA1M2YwNDRkZmZhZjNkYWU3M2FlM2Y2NGMzKQogICAgICAgIDsKCiAgICAgICAgCiAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb499ca3b50>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([45.5, -122], zoom_start=3)\n",
    "\n",
    "icon_plane = plugins.BeautifyIcon(\n",
    "    icon=\"plane\", border_color=\"#b3334f\", text_color=\"#b3334f\", icon_shape=\"triangle\"\n",
    ")\n",
    "\n",
    "icon_number = plugins.BeautifyIcon(\n",
    "    border_color=\"#00ABDC\",\n",
    "    text_color=\"#00ABDC\",\n",
    "    number=10,\n",
    "    inner_icon_style=\"margin-top:0;\",\n",
    ")\n",
    "\n",
    "folium.Marker(location=[46, -122], popup=\"Portland, OR\", icon=icon_plane).add_to(m)\n",
    "\n",
    "folium.Marker(location=[50, -122], popup=\"Portland, OR\", icon=icon_number).add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Fullscreen"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMv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0gTC5tYXAoCiAgICAgICAgICAgICAgICAibWFwXzk4YjNkMmE4YjUzMTRlNDk5MDUyMTVlNTk4MTE0Zjc0IiwKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBjZW50ZXI6IFs0MS45LCAtOTcuM10sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA0LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfMzU3Y2QzOGMzOWM5NDE0YTg5NjdlZmFiODYzMDBhNzIgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwgIm9wYWNpdHkiOiAxLCAic3ViZG9tYWlucyI6ICJhYmMiLCAidG1zIjogZmFsc2V9CiAgICAgICAgICAgICkuYWRkVG8obWFwXzk4YjNkMmE4YjUzMTRlNDk5MDUyMTVlNTk4MTE0Zjc0KTsKICAgICAgICAKICAgIAogICAgICAgICAgICBMLmNvbnRyb2wuZnVsbHNjcmVlbigKICAgICAgICAgICAgICAgIHsiZm9yY2VTZXBhcmF0ZUJ1dHRvbiI6IHRydWUsICJwb3NpdGlvbiI6ICJ0b3ByaWdodCIsICJ0aXRsZSI6ICJFeHBhbmQgbWUiLCAidGl0bGVDYW5jZWwiOiAiRXhpdCBtZSJ9CiAgICAgICAgICAgICkuYWRkVG8obWFwXzk4YjNkMmE4YjUzMTRlNDk5MDUyMTVlNTk4MTE0Zjc0KTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb499b7d3a0>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[41.9, -97.3], zoom_start=4)\n",
    "\n",
    "plugins.Fullscreen(\n",
    "    position=\"topright\",\n",
    "    title=\"Expand me\",\n",
    "    title_cancel=\"Exit me\",\n",
    "    force_separate_button=True,\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  Timestamped GeoJSON"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbn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RiIsICJ3ZWlnaHQiOiA1fX19XX0sIHsKICAgICAgICAgICAgICAgICAgICBwb2ludFRvTGF5ZXI6IGZ1bmN0aW9uIChmZWF0dXJlLCBsYXRMbmcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZlYXR1cmUucHJvcGVydGllcy5pY29uID09ICdtYXJrZXInKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihmZWF0dXJlLnByb3BlcnRpZXMuaWNvbnN0eWxlKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEwuTWFya2VyKGxhdExuZywgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uOiBMLmljb24oZmVhdHVyZS5wcm9wZXJ0aWVzLmljb25zdHlsZSl9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMLk1hcmtlcihsYXRMbmcpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLnByb3BlcnRpZXMuaWNvbiA9PSAnY2lyY2xlJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZlYXR1cmUucHJvcGVydGllcy5pY29uc3R5bGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEwuY2lyY2xlTWFya2VyKGxhdExuZywgZmVhdHVyZS5wcm9wZXJ0aWVzLmljb25zdHlsZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9lbHNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEwuY2lyY2xlTWFya2VyKGxhdExuZyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLy9lbHNlCgogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEwuTWFya2VyKGxhdExuZyk7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBzdHlsZTogZnVuY3Rpb24gKGZlYXR1cmUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZlYXR1cmUucHJvcGVydGllcy5zdHlsZTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIG9uRWFjaEZlYXR1cmU6IGZ1bmN0aW9uKGZlYXR1cmUsIGxheWVyKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLnByb3BlcnRpZXMucG9wdXApIHsKICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXIuYmluZFBvcHVwKGZlYXR1cmUucHJvcGVydGllcy5wb3B1cCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgdmFyIHRpbWVzdGFtcGVkX2dlb19qc29uX2IwNjZlNmFiNmQwMzRiMDU5ODAyMjgzZjE0ZDNjN2VkID0gTC50aW1lRGltZW5zaW9uLmxheWVyLmdlb0pzb24oCiAgICAgICAgICAgICAgICBnZW9Kc29uTGF5ZXIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgdXBkYXRlVGltZURpbWVuc2lvbjogdHJ1ZSwKICAgICAgICAgICAgICAgICAgICBhZGRsYXN0UG9pbnQ6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgZHVyYXRpb246IHVuZGVmaW5lZCwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfMWI1NWQyMTQ5OGNmNDhhZDhjZDFkNWI3ZjRmMGU3MTEpOwogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb4982d9430>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[35.68159659061569, 139.76451516151428], zoom_start=16)\n",
    "\n",
    "# Lon, Lat order.\n",
    "lines = [\n",
    "    {\n",
    "        \"coordinates\": [\n",
    "            [139.76451516151428, 35.68159659061569],\n",
    "            [139.75964426994324, 35.682590062684206],\n",
    "        ],\n",
    "        \"dates\": [\"2017-06-02T00:00:00\", \"2017-06-02T00:10:00\"],\n",
    "        \"color\": \"red\",\n",
    "    },\n",
    "    {\n",
    "        \"coordinates\": [\n",
    "            [139.75964426994324, 35.682590062684206],\n",
    "            [139.7575843334198, 35.679505030038506],\n",
    "        ],\n",
    "        \"dates\": [\"2017-06-02T00:10:00\", \"2017-06-02T00:20:00\"],\n",
    "        \"color\": \"blue\",\n",
    "    },\n",
    "    {\n",
    "        \"coordinates\": [\n",
    "            [139.7575843334198, 35.679505030038506],\n",
    "            [139.76337790489197, 35.678040905014065],\n",
    "        ],\n",
    "        \"dates\": [\"2017-06-02T00:20:00\", \"2017-06-02T00:30:00\"],\n",
    "        \"color\": \"green\",\n",
    "        \"weight\": 15,\n",
    "    },\n",
    "    {\n",
    "        \"coordinates\": [\n",
    "            [139.76337790489197, 35.678040905014065],\n",
    "            [139.76451516151428, 35.68159659061569],\n",
    "        ],\n",
    "        \"dates\": [\"2017-06-02T00:30:00\", \"2017-06-02T00:40:00\"],\n",
    "        \"color\": \"#FFFFFF\",\n",
    "    },\n",
    "]\n",
    "\n",
    "features = [\n",
    "    {\n",
    "        \"type\": \"Feature\",\n",
    "        \"geometry\": {\n",
    "            \"type\": \"LineString\",\n",
    "            \"coordinates\": line[\"coordinates\"],\n",
    "        },\n",
    "        \"properties\": {\n",
    "            \"times\": line[\"dates\"],\n",
    "            \"style\": {\n",
    "                \"color\": line[\"color\"],\n",
    "                \"weight\": line[\"weight\"] if \"weight\" in line else 5,\n",
    "            },\n",
    "        },\n",
    "    }\n",
    "    for line in lines\n",
    "]\n",
    "\n",
    "plugins.TimestampedGeoJson(\n",
    "    {\n",
    "        \"type\": \"FeatureCollection\",\n",
    "        \"features\": features,\n",
    "    },\n",
    "    period=\"PT1M\",\n",
    "    add_last_point=True,\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQg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lLCAib3BhY2l0eSI6IDEsICJzdWJkb21haW5zIjogImFiYyIsICJ0bXMiOiBmYWxzZX0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfZTY0MjhmZGYxMTE3NDNhODkwNzY1M2IyY2NmMGZmNDcpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIEwuQ29udHJvbC5UaW1lRGltZW5zaW9uQ3VzdG9tID0gTC5Db250cm9sLlRpbWVEaW1lbnNpb24uZXh0ZW5kKHsKICAgICAgICAgICAgICAgIF9nZXREaXNwbGF5RGF0ZUZvcm1hdDogZnVuY3Rpb24oZGF0ZSl7CiAgICAgICAgICAgICAgICAgICAgdmFyIG5ld2RhdGUgPSBuZXcgbW9tZW50KGRhdGUpOwogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKG5ld2RhdGUpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ld2RhdGUuZm9ybWF0KCJZWVlZL01NL0REIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBtYXBfZTY0MjhmZGYxMTE3NDNhODkwNzY1M2IyY2NmMGZmNDcudGltZURpbWVuc2lvbiA9IEwudGltZURpbWVuc2lvbigKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBwZXJpb2Q6ICJQMU0iLAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICApOwogICAgICAgICAgICB2YXIgdGltZURpbWVuc2lvbkNvbnRyb2wgPSBuZXcgTC5Db250cm9sLlRpbWVEaW1lbnNpb25DdXN0b20oCiAgICAgICAgICAgICAgICB7ImF1dG9QbGF5IjogZmFsc2UsICJsb29wQnV0dG9uIjogdHJ1ZSwgIm1heFNwZWVkIjogMSwgIm1pblNwZWVkIjogMC4xLCAicGxheWVyT3B0aW9ucyI6IHsibG9vcCI6IGZhbHNlLCAic3RhcnRPdmVyIjogdHJ1ZSwgInRyYW5zaXRpb25UaW1lIjogMjAwfSwgInBvc2l0aW9uIjogImJvdH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bHNlIiwgInJhZGl1cyI6IDEzfSwgInN0eWxlIjogeyJ3ZWlnaHQiOiAwfSwgImlkIjogIm1hbiJ9fV19LCB7CiAgICAgICAgICAgICAgICAgICAgcG9pbnRUb0xheWVyOiBmdW5jdGlvbiAoZmVhdHVyZSwgbGF0TG5nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLnByb3BlcnRpZXMuaWNvbiA9PSAnbWFya2VyJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZmVhdHVyZS5wcm9wZXJ0aWVzLmljb25zdHlsZSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMLk1hcmtlcihsYXRMbmcsIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogTC5pY29uKGZlYXR1cmUucHJvcGVydGllcy5pY29uc3R5bGUpfSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2Vsc2UKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgTC5NYXJrZXIobGF0TG5nKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmVhdHVyZS5wcm9wZXJ0aWVzLmljb24gPT0gJ2NpcmNsZScpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmZWF0dXJlLnByb3BlcnRpZXMuaWNvbnN0eWxlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMLmNpcmNsZU1hcmtlcihsYXRMbmcsIGZlYXR1cmUucHJvcGVydGllcy5pY29uc3R5bGUpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMLmNpcmNsZU1hcmtlcihsYXRMbmcpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC8vZWxzZQoKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBMLk1hcmtlcihsYXRMbmcpOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgc3R5bGU6IGZ1bmN0aW9uIChmZWF0dXJlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmZWF0dXJlLnByb3BlcnRpZXMuc3R5bGU7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBvbkVhY2hGZWF0dXJlOiBmdW5jdGlvbihmZWF0dXJlLCBsYXllcikgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmVhdHVyZS5wcm9wZXJ0aWVzLnBvcHVwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyLmJpbmRQb3B1cChmZWF0dXJlLnByb3BlcnRpZXMucG9wdXApOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIHZhciB0aW1lc3RhbXBlZF9nZW9fanNvbl80M2I1YTBjZTkwNWE0NDNiYTVmMmNmMDY0MWUwMjEyMyA9IEwudGltZURpbWVuc2lvbi5sYXllci5nZW9Kc29uKAogICAgICAgICAgICAgICAgZ2VvSnNvbkxheWVyLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIHVwZGF0ZVRpbWVEaW1lbnNpb246IHRydWUsCiAgICAgICAgICAgICAgICAgICAgYWRkbGFzdFBvaW50OiB0cnVlLAogICAgICAgICAgICAgICAgICAgIGR1cmF0aW9uOiAiUDJNIiwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfZTY0MjhmZGYxMTE3NDNhODkwNzY1M2IyY2NmMGZmNDcpOwogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb4982d8e80>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "table = \"\"\"\\\n",
    "<table style=\\'width:100%\\'>\n",
    "  <tr>\n",
    "    <th>Firstname</th>\n",
    "    <th>Lastname</th>\n",
    "    <th>Age</th>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>Jill</td>\n",
    "    <td>Smith</td>\n",
    "    <td>50</td>\n",
    "  </tr>\n",
    "  <tr>\n",
    "    <td>Eve</td>\n",
    "    <td>Jackson</td>\n",
    "    <td>94</td>\n",
    "  </tr>\n",
    "</table>\n",
    "\"\"\"\n",
    "\n",
    "points = [\n",
    "    {\n",
    "        \"time\": \"2017-06-02\",\n",
    "        \"popup\": \"<h1>address1</h1>\",\n",
    "        \"coordinates\": [-2.548828, 51.467697],\n",
    "    },\n",
    "    {\n",
    "        \"time\": \"2017-07-02\",\n",
    "        \"popup\": \"<h2 style='color:blue;'>address2<h2>\",\n",
    "        \"coordinates\": [-0.087891, 51.536086],\n",
    "    },\n",
    "    {\n",
    "        \"time\": \"2017-08-02\",\n",
    "        \"popup\": \"<h2 style='color:orange;'>address3<h2>\",\n",
    "        \"coordinates\": [-6.240234, 53.383328],\n",
    "    },\n",
    "    {\n",
    "        \"time\": \"2017-09-02\",\n",
    "        \"popup\": \"<h2 style='color:green;'>address4<h2>\",\n",
    "        \"coordinates\": [-1.40625, 60.261617],\n",
    "    },\n",
    "    {\"time\": \"2017-10-02\", \"popup\": table, \"coordinates\": [-1.516113, 53.800651]},\n",
    "]\n",
    "\n",
    "features = [\n",
    "    {\n",
    "        \"type\": \"Feature\",\n",
    "        \"geometry\": {\n",
    "            \"type\": \"Point\",\n",
    "            \"coordinates\": point[\"coordinates\"],\n",
    "        },\n",
    "        \"properties\": {\n",
    "            \"time\": point[\"time\"],\n",
    "            \"popup\": point[\"popup\"],\n",
    "            \"id\": \"house\",\n",
    "            \"icon\": \"marker\",\n",
    "            \"iconstyle\": {\n",
    "                \"iconUrl\": \"https://leafletjs.com/examples/geojson/baseball-marker.png\",\n",
    "                \"iconSize\": [20, 20],\n",
    "            },\n",
    "        },\n",
    "    }\n",
    "    for point in points\n",
    "]\n",
    "\n",
    "features.append(\n",
    "    {\n",
    "        \"type\": \"Feature\",\n",
    "        \"geometry\": {\n",
    "            \"type\": \"LineString\",\n",
    "            \"coordinates\": [\n",
    "                [-2.548828, 51.467697],\n",
    "                [-0.087891, 51.536086],\n",
    "                [-6.240234, 53.383328],\n",
    "                [-1.40625, 60.261617],\n",
    "                [-1.516113, 53.800651],\n",
    "            ],\n",
    "        },\n",
    "        \"properties\": {\n",
    "            \"popup\": \"Current address\",\n",
    "            \"times\": [\n",
    "                \"2017-06-02\",\n",
    "                \"2017-07-02\",\n",
    "                \"2017-08-02\",\n",
    "                \"2017-09-02\",\n",
    "                \"2017-10-02\",\n",
    "            ],\n",
    "            \"icon\": \"circle\",\n",
    "            \"iconstyle\": {\n",
    "                \"fillColor\": \"green\",\n",
    "                \"fillOpacity\": 0.6,\n",
    "                \"stroke\": \"false\",\n",
    "                \"radius\": 13,\n",
    "            },\n",
    "            \"style\": {\"weight\": 0},\n",
    "            \"id\": \"man\",\n",
    "        },\n",
    "    }\n",
    ")\n",
    "\n",
    "m = folium.Map(\n",
    "    location=[56.096555, -3.64746],\n",
    "    tiles=\"cartodbpositron\",\n",
    "    zoom_start=5,\n",
    ")\n",
    "\n",
    "plugins.TimestampedGeoJson(\n",
    "    {\"type\": \"FeatureCollection\", \"features\": features},\n",
    "    period=\"P1M\",\n",
    "    add_last_point=True,\n",
    "    auto_play=False,\n",
    "    loop=False,\n",
    "    max_speed=1,\n",
    "    loop_button=True,\n",
    "    date_options=\"YYYY/MM/DD\",\n",
    "    time_slider_drag_update=True,\n",
    "    duration=\"P2M\",\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## FeatureGroupSubGroup\n",
    "\n",
    "### Sub categories\n",
    "\n",
    "Disable all markers in the category, or just one of the subgroup."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiA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0In0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfODc2MTVmM2UxNGU0NGVhZWI1M2M0ZTJmOWNmNTliYzEpOwogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb499b7da00>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[0, 0], zoom_start=6)\n",
    "\n",
    "fg = folium.FeatureGroup(name=\"groups\")\n",
    "m.add_child(fg)\n",
    "\n",
    "g1 = plugins.FeatureGroupSubGroup(fg, \"group1\")\n",
    "m.add_child(g1)\n",
    "\n",
    "g2 = plugins.FeatureGroupSubGroup(fg, \"group2\")\n",
    "m.add_child(g2)\n",
    "\n",
    "folium.Marker([-1, -1]).add_to(g1)\n",
    "folium.Marker([1, 1]).add_to(g1)\n",
    "\n",
    "folium.Marker([-1, 1]).add_to(g2)\n",
    "folium.Marker([1, -1]).add_to(g2)\n",
    "\n",
    "folium.LayerControl(collapsed=False).add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Marker clusters across groups\n",
    "\n",
    "Create two subgroups, but cluster markers together."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1s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fN2NhMTg5MTUzN2RmNDI4YWEyMjI3MDdjZGU1ZTNmMWYgPSBMLm1hcCgKICAgICAgICAgICAgICAgICJtYXBfN2NhMTg5MTUzN2RmNDI4YWEyMjI3MDdjZGU1ZTNmMWYiLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWzAuMCwgMC4wXSwKICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3LAogICAgICAgICAgICAgICAgICAgIHpvb206IDYsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgcHJlZmVyQ2FudmFzOiBmYWxzZSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKTsKCiAgICAgICAgICAgIAoKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl80NTkyNjU2YWM4ZDk0YzBmOTg3NTZmOTcxODQwMmIzMyA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgImh0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nIiwKICAgICAgICAgICAgICAgIHsiYXR0cmlidXRpb24iOiAiRGF0YSBieSBcdTAwMjZjb3B5OyBcdTAwM2NhIGhyZWY9XCJodHRwOi8vb3BlbnN0cmVldG1hcC5vcmdcIlx1MDAzZU9wZW5TdHJlZXRNYXBcdTAwM2MvYVx1MDAzZSwgdW5kZXIgXHUwMDNjYSBocmVmPVwiaHR0cDovL3d3dy5vcGVuc3RyZWV0bWFwLm9yZy9jb3B5cmlnaHRcIlx1MDAzZU9EYkxcdTAwM2MvYVx1MDAzZS4iLCAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsICJtYXhOYXRpdmVab29tIjogMTgsICJtYXhab29tIjogMTgsICJtaW5ab29tIjogMCwgIm5vV3JhcCI6IGZhbHNlLCAib3BhY2l0eSI6IDEsICJzdWJkb21haW5zIjogImFiYy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AgIFsxLjAsIC0xLjBdLAogICAgICAgICAgICAgICAge30KICAgICAgICAgICAgKS5hZGRUbyhmZWF0dXJlX2dyb3VwX3N1Yl9ncm91cF83OGVmNTkzZGYwMmI0NmQwOTBkYjc5MDRhM2JhOWI4NCk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGxheWVyX2NvbnRyb2xfM2RjMjZjYmZkNWM5NDM0YmFjYzhlOGFlMmY2ZjU2MjUgPSB7CiAgICAgICAgICAgICAgICBiYXNlX2xheWVycyA6IHsKICAgICAgICAgICAgICAgICAgICAib3BlbnN0cmVldG1hcCIgOiB0aWxlX2xheWVyXzQ1OTI2NTZhYzhkOTRjMGY5ODc1NmY5NzE4NDAyYjMzLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIG92ZXJsYXlzIDogIHsKICAgICAgICAgICAgICAgICAgICAiZ3JvdXAxIiA6IGZlYXR1cmVfZ3JvdXBfc3ViX2dyb3VwX2MzMzI2MjM3MjI0NTQyYWRiMDA0YjcxZjk1YzUwYWM5LAogICAgICAgICAgICAgICAgICAgICJncm91cDIiIDogZmVhdHVyZV9ncm91cF9zdWJfZ3JvdXBfNzhlZjU5M2RmMDJiNDZkMDkwZGI3OTA0YTNiYTliODQsCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICB9OwogICAgICAgICAgICBMLmNvbnRyb2wubGF5ZXJzKAogICAgICAgICAgICAgICAgbGF5ZXJfY29udHJvbF8zZGMyNmNiZmQ1Yzk0MzRiYWNjOGU4YWUyZjZmNTYyNS5iYXNlX2xheWVycywKICAgICAgICAgICAgICAgIGxheWVyX2NvbnRyb2xfM2RjMjZjYmZkNWM5NDM0YmFjYzhlOGFlMmY2ZjU2MjUub3ZlcmxheXMsCiAgICAgICAgICAgICAgICB7ImF1dG9aSW5kZXgiOiB0cnVlLCAiY29sbGFwc2VkIjogZmFsc2UsICJwb3NpdGlvbiI6ICJ0b3ByaWdodCJ9CiAgICAgICAgICAgICkuYWRkVG8obWFwXzdjYTE4OTE1MzdkZjQyOGFhMjIyNzA3Y2RlNWUzZjFmKTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb498310580>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[0, 0], zoom_start=6)\n",
    "\n",
    "mcg = folium.plugins.MarkerCluster(control=False)\n",
    "m.add_child(mcg)\n",
    "\n",
    "g1 = folium.plugins.FeatureGroupSubGroup(mcg, \"group1\")\n",
    "m.add_child(g1)\n",
    "\n",
    "g2 = folium.plugins.FeatureGroupSubGroup(mcg, \"group2\")\n",
    "m.add_child(g2)\n",
    "\n",
    "folium.Marker([-1, -1]).add_to(g1)\n",
    "folium.Marker([1, 1]).add_to(g1)\n",
    "\n",
    "folium.Marker([-1, 1]).add_to(g2)\n",
    "folium.Marker([1, -1]).add_to(g2)\n",
    "\n",
    "folium.LayerControl(collapsed=False).add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Minimap\n",
    "\n",
    "Adds a locator minimap to a folium document."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04I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TAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuanMuY2xvdWRmbGFyZS5jb20vYWpheC9saWJzL2xlYWZsZXQtbWluaW1hcC8zLjYuMS9Db250cm9sLk1pbmlNYXAuanMiPjwvc2NyaXB0PgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9sZWFmbGV0LW1pbmltYXAvMy42LjEvQ29udHJvbC5NaW5pTWFwLmNzcyIvPgo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2Q4MTk4ZmQ4MWQ5ODRlMGVhODcxNzYwMjYzNzk0ZmFmIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF9kODE5OGZkODFkOTg0ZTBlYTg3MTc2MDI2Mzc5NGZhZiA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF9kODE5OGZkODFkOTg0ZTBlYTg3MTc2MDI2Mzc5NGZhZiIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbMzAuMCwgMjAuMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA0LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAg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jk4YWMzMTZlMWYzZDhlKTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb4982d9df0>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=(30, 20), zoom_start=4)\n",
    "\n",
    "minimap = plugins.MiniMap()\n",
    "m.add_child(minimap)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## DualMap\n",
    "The DualMap plugin can be used to display two maps side by side, where panning and zooming is syncronized.\n",
    "\n",
    "The `DualMap` class can be used just like the normal `Map` class. The two sub-maps can be accessed with its `m1` and `m2` attributes."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZ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Dk5YmM1MDFlMWNmNTcyOTUiLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWzUyLjEsIDUuMV0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA4LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfNGNlOGVjYmFjNTYyNDgwOTk4NWZmYTk0MmQ2MzgwYmQgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwgIm9wYWNpdHkiOiAxLCAic3ViZG9tYWlucyI6ICJhYmMiLCAidG1zIjogZmFsc2V9CiAgICAgICAgICAgICkuYWRkVG8obWFwX2ZmM2U2ZWI1MjMxNzQ4YTA5OWJjNTAxZTFjZjU3Mjk1KTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgZmVhdHVyZV9ncm91cF9jMDU5MmEyOTA3M2Q0MGVhODM2NzY4MWIxYzFiNGI4OSA9IEwuZmVhdHVyZUdyb3VwKAogICAgICAgICAgICAgICAge30KICAgICAgICAgICAgKS5hZGRUbyhtYXBfZmYzZTZlYjUyMzE3NDhhMDk5YmM1MDFlMWNmNTcyOTUpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXJrZXJfMjYzYTA0ZTYyZGVkNDQ1ZjlkYmE5MWViMGUwODI3ZWIgPSBMLm1hcmtlcigKICAgICAgICAgICAgICAgIFs1Mi4wLCA1LjBdLAogICAgICAgICAgICAgICAge30KICAgICAgICAgICAgKS5hZGRUbyhmZWF0dXJlX2dyb3VwX2MwNTkyYTI5MDczZDQwZWE4MzY3NjgxYjFjMWI0Yjg5KTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgaWNvbl81ZTIyNzI3NTgwMWQ0YTU0OWZhNzFhNTI1NTZmNTIwOCA9IEwuQXdlc29tZU1hcmtlcnMuaWNvbigKICAgICAgICAgICAgICAgIHsiZXh0cmFDbGFzc2VzIjogImZhLXJvdGF0ZS0wIiwgImljb24iOiAiaW5mby1zaWduIiwgImljb25Db2xvciI6ICJ3aGl0ZSIsICJtYXJrZXJDb2xvciI6ICJyZWQiLCAicHJlZml4IjogImdseXBoaWNvbiJ9CiAgICAgICAgICAgICk7CiAgICAgICAgICAgIG1hcmtlcl8yNjNhMDRlNjJkZWQ0NDVmOWRiYTkxZWIwZTA4MjdlYi5zZXRJY29uKGljb25fNWUyMjcyNzU4MDFkNGE1NDlmYTcxYTUyNTU2ZjUyMDgpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIG1hcmtlcl8yNjNhMDRlNjJkZWQ0NDVmOWRiYTkxZWIwZTA4MjdlYi5iaW5kVG9vbHRpcCgKICAgICAgICAgICAgICAgIGA8ZGl2PgogICAgICAgICAgICAgICAgICAgICBib3RoCiAgICAgICAgICAgICAgICAgPC9kaXY+YCwKICAgICAgICAgICAgICAgIHsic3RpY2t5IjogdHJ1ZX0KICAgICAgICAgICAgKTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgZmVhdHVyZV9ncm91cF9kYjYzNmY3MTE5MTg0N2FmOGFhNzEwMDM2ZTNlMjYwMiA9IEwuZmVhdHVyZUdyb3VwKAogICAgICAgICAgICAgICAge30KICAgICAgICAgICAgKS5hZGRUbyhtYXBfZmYzZTZlYjUyMzE3NDhhMDk5YmM1MDFlMWNmNTcyOTUpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXJrZXJfMWNlMmU5NDJmNDBjNDQxOGEyMWYzNTM5YzYzNTkxNTAgPSBMLm1hcmtlcigKICAgICAgICAgICAgICAgIFs1Mi40LCA1LjBdLAogICAgICAgICAgICAgICAge30KICAgICAgICAgICAgKS5hZGRUbyhmZWF0dXJlX2dyb3VwX2RiNjM2ZjcxMTkxODQ3YWY4YWE3MTAwMzZlM2UyNjAyKTsKICAgICAgICAKICAgIAogICAgICAgICAgICBtYXJrZXJfMWNlMmU5NDJmNDBjNDQxOGEyMWYzNTM5YzYzNTkxNTAuYmluZFRvb2x0aXAoCiAgICAgICAgICAgICAgICBgPGRpdj4KICAgICAgICAgICAgICAgICAgICAgbGVmdAogICAgICAgICAgICAgICAgIDwvZGl2PmAsCiAgICAgICAgICAgICAgICB7InN0aWNreSI6IHRydWV9CiAgICAgICAgICAgICk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGxheWVyX2NvbnRyb2xfMDZiNTE1N2Q2MGZhNDQ5ZWIwOTZkNDI1OTM1OWE5OGQgPSB7CiAgICAgICAgICAgICAgICBiYXNlX2xheWVycyA6IHsKICAgICAgICAgICAgICAgICAgICAib3BlbnN0cmVldG1hcCIgOiB0aWxlX2xheWVyXzRjZThlY2JhYzU2MjQ4MDk5ODVmZmE5NDJkNjM4MGJkLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIG92ZXJsYXlzIDogIHsKICAgICAgICAgICAgICAgICAgICAibWFya2Vyc19ib3RoIiA6IGZlYXR1cmVfZ3JvdXBfYzA1OTJhMjkwNzNkNDBlYTgzNjc2ODFiMWMxYjRiODksCiAgICAgICAgICAgICAgICAgICAgIm1hcmtlcnNfMSIgOiBmZWF0dXJlX2dyb3VwX2RiNjM2ZjcxMTkxODQ3YWY4YWE3MTAwMzZlM2UyNjAyLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgTC5jb250cm9sLmxheWVycygKICAgICAgICAgICAgICAgIGxheWVyX2NvbnRyb2xfMDZiNTE1N2Q2MGZhNDQ5ZWIwOTZkNDI1OTM1OWE5OGQuYmFzZV9sYXllcnMsCiAgICAgICAgICAgICAgICBsYXllcl9jb250cm9sXzA2YjUxNTdkNjBmYTQ0OWViMDk2ZDQyNTkzNTlhOThkLm92ZXJsYXlzLAogICAgICAgICAgICAgICAgeyJhdXRvWkluZGV4IjogdHJ1ZSwgImNvbGxhcHNlZCI6IGZhbHNlLCAicG9zaXRpb24iOiAidG9wcmlnaHQifQogICAgICAgICAgICApLmFkZFRvKG1hcF9mZjNlNmViNTIzMTc0OGEwOTliYzUwMWUxY2Y1NzI5NSk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF9lYzg1ZDQ4ZmFhZDk0NjA4YWUyYzIyZTY5OWFmZjMxOSA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF9lYzg1ZDQ4ZmFhZDk0NjA4YWUyYzIyZTY5OWFmZjMxOSIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbNTIuMSwgNS4xXSwKICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3LAogICAgICAgICAgICAgICAgICAgIHpvb206IDgsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IHRydWUsCiAgICAgICAgICAg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xNzM4YjFmKTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgaWNvbl9hNDJkZDIxN2RlMzU0NDA2YmRmMzZiNGMzYjQ4NzU5YSA9IEwuQXdlc29tZU1hcmtlcnMuaWNvbigKICAgICAgICAgICAgICAgIHsiZXh0cmFDbGFzc2VzIjogImZhLXJvdGF0ZS0wIiwgImljb24iOiAiaW5mby1zaWduIiwgImljb25Db2xvciI6ICJ3aGl0ZSIsICJtYXJrZXJDb2xvciI6ICJyZWQiLCAicHJlZml4IjogImdseXBoaWNvbiJ9CiAgICAgICAgICAgICk7CiAgICAgICAgICAgIG1hcmtlcl82YmE3Mjg5OTc3YzQ0M2QxYjU2ZDFkMTQ0ZTQwYmU4NC5zZXRJY29uKGljb25fYTQyZGQyMTdkZTM1NDQwNmJkZjM2YjRjM2I0ODc1OWEpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIG1hcmtlcl82YmE3Mjg5OTc3YzQ0M2QxYjU2ZDFkMTQ0ZTQwYmU4NC5iaW5kVG9vbHRpcCgKICAgICAgICAgICAgICAgIGA8ZGl2PgogICAgICAgICAgICAgICAgICAgICBib3RoCiAgICAgICAgICAgICAgICAgPC9kaXY+YCwKICAgICAgICAgICAgICAgIHsic3RpY2t5IjogdHJ1ZX0KICAgICAgICAgICAgKTsKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgbGF5ZXJfY29udHJvbF83OTg5ZjA4OTQyYjM0YjAxYmVhNTdiZjc0OGMyNjBhNCA9IHsKICAgICAgICAgICAgICAgIGJhc2VfbGF5ZXJzIDogewogICAgICAgICAgICAgICAgICAgICJjYXJ0b2RicG9zaXRyb24iIDogdGlsZV9sYXllcl84YmZjY2MzMGY2MjQ0ODc1OGFlZWRhOTc2MmRkNWNkMywKICAgICAgICAgICAgICAgICAgICAib3BlbnN0cmVldG1hcCIgOiB0aWxlX2xheWVyX2E0ZjQ2YTdmN2M1MTQ1ZWY5NDVmNjk1MDI0NzA0YWY4LAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIG92ZXJsYXlzIDogIHsKICAgICAgICAgICAgICAgICAgICAibWFya2Vyc19ib3RoIiA6IGZlYXR1cmVfZ3JvdXBfNjYxODVmYzNlM2IxNGMxNzk3OTg3NTJhNTE3MzhiMWYsCiAgICAgICAgICAgICAgICAgICAgIm1hcmtlcnNfMiIgOiBmZWF0dXJlX2dyb3VwX2FhYjc3YzliMTU1NDRiYzc4YTRhYTg2YjllZTAzZTY3LAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgTC5jb250cm9sLmxheWVycygKICAgICAgICAgICAgICAgIGxheWVyX2NvbnRyb2xfNzk4OWYwODk0MmIzNGIwMWJlYTU3YmY3NDhjMjYwYTQuYmFzZV9sYXllcnMsCiAgICAgICAgICAgICAgICBsYXllcl9jb250cm9sXzc5ODlmMDg5NDJiMzRiMDFiZWE1N2JmNzQ4YzI2MGE0Lm92ZXJsYXlzLAogICAgICAgICAgICAgICAgeyJhdXRvWkluZGV4IjogdHJ1ZSwgImNvbGxhcHNlZCI6IGZhbHNlLCAicG9zaXRpb24iOiAidG9wcmlnaHQifQogICAgICAgICAgICApLmFkZFRvKG1hcF9lYzg1ZDQ4ZmFhZDk0NjA4YWUyYzIyZTY5OWFmZjMxOSk7CiAgICAgICAgICAgIHRpbGVfbGF5ZXJfYTRmNDZhN2Y3YzUxNDVlZjk0NWY2OTUwMjQ3MDRhZjgucmVtb3ZlKCk7CiAgICAgICAgCjwvc2NyaXB0Pg== onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.plugins.dual_map.DualMap at 0x7fb4982dadf0>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = plugins.DualMap(location=(52.1, 5.1), tiles=None, zoom_start=8)\n",
    "\n",
    "folium.TileLayer(\"cartodbpositron\").add_to(m.m2)\n",
    "folium.TileLayer(\"openstreetmap\").add_to(m)\n",
    "\n",
    "fg_both = folium.FeatureGroup(name=\"markers_both\").add_to(m)\n",
    "fg_1 = folium.FeatureGroup(name=\"markers_1\").add_to(m.m1)\n",
    "fg_2 = folium.FeatureGroup(name=\"markers_2\").add_to(m.m2)\n",
    "\n",
    "icon_red = folium.Icon(color=\"red\")\n",
    "folium.Marker((52, 5), tooltip=\"both\", icon=icon_red).add_to(fg_both)\n",
    "folium.Marker((52.4, 5), tooltip=\"left\").add_to(fg_1)\n",
    "folium.Marker((52, 5.4), tooltip=\"right\").add_to(fg_2)\n",
    "\n",
    "folium.LayerControl(collapsed=False).add_to(m)\n",
    "\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Locate control\n",
    "\n",
    "Adds a control button that when clicked, the user device geolocation is displayed.\n",
    "For list of all possible keyword options see:\n",
    "https://github.com/domoritz/leaflet-locatecontrol#possible-options\n",
    "\n",
    "To work properly in production, the connection needs to be encrypted (HTTPS), otherwise browser will not\n",
    "allow users to share their location."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWx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AgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuanMuY2xvdWRmbGFyZS5jb20vYWpheC9saWJzL2xlYWZsZXQtbG9jYXRlY29udHJvbC8wLjY2LjIvTC5Db250cm9sLkxvY2F0ZS5taW4uanMiPjwvc2NyaXB0PgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9sZWFmbGV0LWxvY2F0ZWNvbnRyb2wvMC42Ni4yL0wuQ29udHJvbC5Mb2NhdGUubWluLmNzcyIvPgo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzZiOTYyZjlhMjk3NzQxMTA5YWZiMDM0MmRkZTc5MmJmIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF82Yjk2MmY5YTI5Nzc0MTEwOWFmYjAzNDJkZGU3OTJiZiA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF82Yjk2MmY5YTI5Nzc0MTEwOWFmYjAzNDJkZGU3OTJiZiIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbNDEuOTcsIDIuODFdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcsCiAgICAgICAgICAgICAgICAgICAgem9vbTogMTAsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgcHJlZmVyQ2FudmFzOiBmYWxzZSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKTsKCiAgICAgICAgICAgIAoKICAgICAgICAKICAgIAogICAgICAgICA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hdGUoCiAgICAgICAgICAgICAgICB7fQogICAgICAgICAgICApLmFkZFRvKG1hcF82Yjk2MmY5YTI5Nzc0MTEwOWFmYjAzNDJkZGU3OTJiZik7CiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgbG9jYXRlX2NvbnRyb2xfMjliNzM2OWY3NzRiNDg0ZDk5MjdhNWZiMDFhZjUxZTIuc3RhcnQoKTsKICAgICAgICAgICAgCiAgICAgICAgCjwvc2NyaXB0Pg== onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb4982da640>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([41.97, 2.81])\n",
    "\n",
    "plugins.LocateControl().add_to(m)\n",
    "\n",
    "# If you want get the user device positon after load the map, set auto_start=True\n",
    "plugins.LocateControl(auto_start=True).add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## SemiCircle\n",
    "This can be used to display a semicircle or sector on a map. Whilst called SemiCircle it is not limited to 180 degree angles and can be used to display a sector of any angle. \n",
    "The semicircle is defined with a location (the central point, if it was a full circle), a radius and will either have a direction and an arc **or** a start angle and a stop angle. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD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TsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAogICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vbGVhZmxldC1zZW1pY2lyY2xlQDIuMC40L1NlbWljaXJjbGUubWluLmpzIj48L3NjcmlwdD4KPC9oZWFkPgo8Ym9keT4gICAgCiAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF9lNmMxYmJjZTRhNDY0YmRjOGU4OTJmODk1M2Q1YmZhYyIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCiAgICAgICAgICAgIHZhciBtYXBfZTZjMWJiY2U0YTQ2NGJkYzhlODkyZjg5NTNkNWJmYWMgPSBMLm1hcCgKICAgICAgICAgICAgICAgICJtYXBfZTZjMWJiY2U0YTQ2NGJkYzhlODkyZjg5NTNkNWJmYWMiLAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNlbnRlcjogWzQ1LjAsIDMuMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA1LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfMzYyYTkwY2RjNjJhNGJmM2JkYzM3ZjY1NjA2O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ODczZDllMWE0NTEzNDFjNWJmZjExNjEyNzM4ZGJlNDcpOwogICAgICAgIAoKICAgICAgICBzZW1pX2NpcmNsZV8xYWY0NzZjNDU4OTI0OGQxOWUwZWM5ZGFkNzNiODZjYy5iaW5kUG9wdXAocG9wdXBfMjg5ODFmOTJlOGZkNDRmYmEwYzJkY2ExOTY4MmNmMWQpCiAgICAgICAgOwoKICAgICAgICAKICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb4982aee20>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map([45, 3], zoom_start=5)\n",
    "\n",
    "plugins.SemiCircle(\n",
    "    (45, 3),\n",
    "    radius=400000,\n",
    "    start_angle=50,\n",
    "    stop_angle=200,\n",
    "    color=\"green\",\n",
    "    fill_color=\"green\",\n",
    "    opacity=0,\n",
    "    popup=\"start angle - 50 degrees, stop angle - 200 degrees\",\n",
    ").add_to(m)\n",
    "\n",
    "plugins.SemiCircle(\n",
    "    (46.5, 9.5),\n",
    "    radius=200000,\n",
    "    direction=360,\n",
    "    arc=90,\n",
    "    color=\"red\",\n",
    "    fill_color=\"red\",\n",
    "    opacity=0,\n",
    "    popup=\"Direction - 0 degrees, arc 90 degrees\",\n",
    ").add_to(m)\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Geocoder\n",
    "\n",
    "Adds a search box to the map to search for geographic features like cities, countries, etc. You can search with names or addresses.\n",
    "\n",
    "Uses the Nomatim service from OpenStreetMap. Please respect their usage policy: https://operations.osmfoundation.org/policies/nominatim/"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS42LjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NvZGUuanF1ZXJ5LmNvbS9qcXVlcnktMS4xMi40Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZmxldC5hd2Vzb21lLW1hcmtlcnMvMi4wLjIvbGVhZ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B7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbMCwgMF0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiAxLAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfMDUyOTNmYmMzZTMwNDM0OWJlNDg5MDI1YTI2ZThjNjggPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwgIm9wYWNpdHkiOiAxLCAic3ViZG9tYWlucyI6ICJhYmMiLCAidG1zIjogZmFsc2V9CiAgICAgICAgICAgICkuYWRkVG8obWFwXzE0MDczMGVkMGUxYTRjZDY4ZWRhNmQxN2YxMDI3Nzg5KTsKICAgICAgICAKICAgIAogICAgICAgICAgICBMLkNvbnRyb2wuZ2VvY29kZXIoCiAgICAgICAgICAgICAgICB7ImNvbGxhcHNlZCI6IGZhbHNlLCAiZGVmYXVsdE1hcmtHZW9jb2RlIjogdHJ1ZSwgInBvc2l0aW9uIjogInRvcHJpZ2h0In0KICAgICAgICAgICAgKS5vbignbWFya2dlb2NvZGUnLCBmdW5jdGlvbihlKSB7CiAgICAgICAgICAgICAgICBtYXBfMTQwNzMwZWQwZTFhNGNkNjhlZGE2ZDE3ZjEwMjc3ODkuc2V0VmlldyhlLmdlb2NvZGUuY2VudGVyLCAxMSk7CiAgICAgICAgICAgIH0pLmFkZFRvKG1hcF8xNDA3MzBlZDBlMWE0Y2Q2OGVkYTZkMTdmMTAyNzc4OSk7CgogICAgICAgIAo8L3NjcmlwdD4= onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fb4982ae190>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map()\n",
    "\n",
    "plugins.Geocoder().add_to(m)\n",
    "\n",
    "m"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
